package com.seal.tsms.other.entity;


import javax.persistence.*;
import java.io.Serializable;


/**
 * Created by seal on 2016/3/20.
 */
@Entity
@Table(name="other_vote")
@IdClass(VotePk.class)
public class Vote implements Serializable{
    private Subject subject;
    private Token token;

    @Id
    @ManyToOne()
    @JoinColumn(name = "subject_id")
    public Subject getSubject() {
        return subject;
    }

    public void setSubject(Subject subject) {
        this.subject = subject;
    }

    @Id
    @ManyToOne()
    @JoinColumn(name = "token_id")
    public Token getToken() {
        return token;
    }

    public void setToken(Token token) {
        this.token = token;
    }
}
